home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / tdlib20.zip / 3DLIB.DOC < prev    next >
Text File  |  1993-06-03  |  23KB  |  447 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                                 ISoft D&M                                ║
  5.  ║                                 POB. 5517                                ║
  6.  ║                           Coralville IA 52241                            ║
  7.  ║                                   U.S.A                                  ║
  8.  ║                                                                          ║
  9.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  10.  
  11. *******************************************************************************
  12. *                                    3dLIB                                    *
  13. * 3dLIB - 3D Graphic objects library for Turbo-Pascal Programmers. V2.0       *
  14. * Last Update : Jun. 03, 1992.                                                *
  15. *******************************************************************************
  16.  
  17. *******************************************************************************
  18. *                                 FILE - LIST                                 *
  19. *******************************************************************************
  20.  
  21.   The distribution package contains the following files :
  22.  
  23.         *       .PAS      - Pascal sources :
  24.                             CTM3D   .PAS - Current Transformation Matrix definition.
  25.                             PROJECT3.PAS - Projection (3D -> 2D) unit.
  26.                             HDR3D   .PAS - Header to 3D structures.
  27.                             RTOBJ   .PAS - 3D Wire-Mesh objects.
  28.                             DEMO3D  .PAS - A demo program - Dos.
  29.                             DEMO3DW .PAS - A demo program - Windows.
  30.         *       .3D2      - Demo OBJ3D Type object files :
  31.                             3       .3D2 - A 3 dimensional "3" character.
  32.                             BOX     .3D2 - A 3D box.
  33.                             D       .3D2 - A 3 dimensional "d" character.
  34.                             PROP    .3D2 - A 3D Propeller.
  35.                             PYR     .3D2 - A Pyramid.
  36.                             SUPROP  .3D2 - Another 3D Propeller.
  37.                             TRAP    .3D2 - A 3D Trapeze.
  38.                             TWOLAYER.3D2 - Demo 3DO defined object.
  39.         *       .3DS      - Demo ComplexObj type object files.
  40.                             BIMBO   .3DS 
  41.                             HOUSE   .3DS - A Very bad example of a house.
  42.                             INMID   .3DS
  43.                             MASHPECH.3DS
  44.                             MYTEST  .3DS
  45.                             TWOBOX  .3DS - 2 Boxes Object.        
  46.                             TWOEDGE .3DS 
  47.                             TWOPYR  .3DS - 2 Pyramids.
  48.         *       .3DD      - Demo object definition files.
  49.                             TWOLAYER.3DD - Two Layers - one above the other.
  50.                             TWOPYR  .3DD - The Two Pyramids Complex Object Src.
  51.         3DLIB   .DOC      - This file.
  52.         3DC     .EXE      - M3D to PAS source file translator. (DOS).
  53.         3DCW    .EXE      - Windows Hosted MDI M3D to PAS generator, and animator.
  54.         3DC     .DOC      - 3dC translator documentation.
  55.         3DA     .EXE      - 3dA Macro Animator (Interpreter) for the Dos environment.
  56.         3DO     .EXE      - 3dO object compiler - Dos.
  57.         3DO     .DOC      - 3dO object compiler documentation.
  58.         *       .M3D      - Sample macro programs.
  59.                             3DEMO   .M3D - Rotating '3' and 'D' objects.
  60.                             BOX3MV  .M3D - Spirale Box.
  61.                             BUG     .M3D - An old macro that once helped me to 
  62.                                            debug some of the 3D code.
  63.                             CLC     .M3D 
  64.                             FOXTROT .M3D - Named after the Genesis album (Why?)
  65.                             INTEGV  .M3D - A Nice macro.
  66.                             KUKU    .M3D
  67.                             NEWDEMO .M3D - A Long macro.
  68.                             PYR3MV  .M3D - Same as BOX3MV but with a pyramid.
  69.                             PYRMOV  .M3D
  70.                             PYRTYP  .M3D
  71.                             R2D2    .M3D
  72.                             SUPERBOX.M3D - A box that "moves" in space..
  73.                             TST     .M3D
  74.                             TWOBOXMV.M3D - A ComplexObject animated.
  75.                             ZOOZO   .M3D        
  76.         DEMO3D  .EXE      - Demo 3d animation program - Dos.
  77.         DEMO3DW .EXE      - Demo 3d animation program - Windows.
  78.         PROGRAMS.TXT      - ISoft D&M shareware products description.
  79.         3DLIB   .REG      - 3dLIB registration file.
  80.         3DLIB   .RES      - 3dLIB resource file for windows programs.
  81.         3DCW    .HLP      - 3dCW online windows help file.
  82.         EGAVGA  .BGI      - BGI driver for EGA/VGA.
  83.         3DLIB   .TPH      - A BP IDE/THELP 3dLib online help.
  84.         BWCC    .DLL      - Borland Windows Custom Controls DLL, Used by 3dCW
  85.  
  86.  
  87. *******************************************************************************
  88. *                                Why Register                                 *
  89. *******************************************************************************
  90.  
  91.   3dLIB is a shareware product, if you find this product valuable, 
  92.  please register it. This section describes the reasons you should register.
  93.  
  94.   By registering you will receive a diskette with the latest 3dLIB version, 
  95.  the 3d environment program, for WYSIWYG object creation, the complete source 
  96.  code for the 3d environment program, and - you will help us to create the next 
  97.  version of 3dLIB - that will include even more features than the features that 
  98.  are currently available!,  we might even add YOUR enhancement requests!
  99.  
  100. *******************************************************************************
  101. *                                 What's  New                                 *
  102. *******************************************************************************
  103.  
  104.   Version 2.0 -
  105.  
  106.   Added the Animate button to the 3dCW program toolbar.
  107.  
  108.   Added the Background BMP toggle option to the 3dCW Options menu.
  109.  
  110.   Added the floating Tools child window to macro editor windows, just click
  111.   on the desired tool to get a command dialog box that will be inserted into
  112.   the source text. (And you thought it can't be easier .. ).
  113.  
  114.   The 3d simple object was updated to use Collections, so the number of points 
  115.   and lines is not limited to the size that was decided when the library was 
  116.   compiled. Please notice - the format of the .3d2 and .3ds files was not
  117.   changed in order to maintain compatiablity with older objects. It should
  118.   be noted that the objects API (Methods calling conventions) was not 
  119.   changed as well. The only difference is in the implementation of the
  120.   3d objects. (It does pay to play by the OOPS rules after all ..).
  121.   Becasue of this change the 3d library can support large and small objects
  122.   at the same time with no practical overhead.
  123.  
  124.   Added the 3DLIB.TPH online file, use this file from within the BP IDE or
  125.   THELP for 3dLib online help.
  126.  
  127. ====
  128.  
  129.   In version 1.7 the help facility of the 3dCW program can be activated from
  130.  the menu, not just from the toolbar.
  131.  
  132.   From this version the extremly important feature of having the author's
  133.  picture in the background of the 3dCW program is added. In this picture the
  134.  author is seen in his Alfa-Romeo Spider 2000. Admit it - this is a feature 
  135.  no other 3d graphic library (how many are there?) can offer you.
  136.  
  137.   The Options|Text Color option in the 3dCW program now works properly.
  138.  
  139.   The help database was extended, and received usefull titles in this
  140.  version.
  141.  
  142.   The 3dCW program was converted to work with Borland's BWCC DLL.
  143.  
  144.   Added Help|Using help option in the 3dCW program.
  145.  
  146.   The 3dO object compiler now supports the creation of complex objects, as
  147.  well as simple objects. (Added a complexObject statement to the 3DD langauge).
  148.  
  149.   The SimpleObject statement of the 3DD langauge (3dO object compiler..) now has
  150.  a new optional parameter - NOGEN.
  151.  
  152. ====
  153.  
  154.   In version 1.6 3dCW users can set the font of the edit window.
  155.  
  156.   The Dos and Windows source library files are combined, and only the 
  157.  different parts are seperated by {$ifdef}s (conditional compiles).
  158.  
  159.   Added support for BP7, and upgraded the utilities to BP7.
  160.  
  161.   3dCW was converted to be a MDI program, with the goodies of a toolbar, etc.
  162.  
  163.   The 'w' and 'b' are handled as they should be in the 3dCW animator from
  164.  this version. (A bug fix). 
  165.  
  166.   Added the 3dO object compiler program, that helps with the creation of
  167.  3d objects from object definition files described in the new object
  168.  definition language. (please refer to 3DO.DOC).
  169.  
  170. ====
  171.  
  172.   In version 1.5 the 3dC and 3dCW programs generate a getClassName function
  173.  for the generated windows.
  174.  
  175.   Added Animate Command to the 3dCW program, this way macros can be prototyped
  176.  before they are translated into source code.
  177.  
  178. ====
  179.  
  180.   Version 1.4 adds the 3dA program - an animator for .M3D macro programs,
  181.  in the dos Environment. 
  182.  
  183.   Version 1.4 also adds the Windows Hosted 3dCW program - A macro translator
  184.  that runs in the Windows environment.
  185.  
  186.   This version was tested with Turbo Pascal for Windows V1.5 .
  187.  
  188. ====
  189.  
  190.   Version 1.3 adds the 3dLIB.RES resource file for use in Windows programs 
  191.  generated by the 3DC program.
  192.  
  193.   3dC generated programs include a menu that allows them to be re-animated and
  194.  closed.
  195.  
  196. ====
  197.  
  198.   Version 1.2 adds support for Turbo Pascal for Windows programmers by including
  199.  a second set of pascal code sources for this compiler. 
  200.  
  201.   The supplied 3dC macro compiler has been enhanced to produce code for both
  202.  compilers, by using a switch on the command line. Please notice - The
  203.  same macro source files can be translated into Turbo Pascal 6.0 and
  204.  Turbo Pascal for Windows code, with no change in the macro definition!
  205.  
  206.   The supplied 3dC macro compiler implemented the z, b and w commands that
  207.  were omitted from version 1.1 because of time constraints.
  208.  
  209. *******************************************************************************
  210. *                                INTRODUCTION                                 *
  211. *******************************************************************************
  212.  
  213.   3dLIB is a library of pascal units that allows Turbo Pascal programmers to                                 
  214.  write applications that display and animate 3D wire-mesh objects. The 
  215.  library is based on a project developed since 1984 on different platforms.
  216.  
  217.   This package supports both Turbo Pascal for DOS and Turbo Pascal for Windows.
  218.  (Or BP 7.0 with objects for dos real/protected and windows targets).
  219.  
  220.   A package called 3D120 is distributed by ISoft D&M that 
  221.  includes a graphic editor, macro interpreter and pascal translator to
  222.  create and use 3D objects. It is highly recommended that any programmer
  223.  trying to use this library will use the 3D program to create 
  224.  objects, and understand the animation abilities of the library.
  225.  
  226.   The 3dCW program is a MDI IDE for 3d macro programs (.M3D files).
  227.  
  228.   For more help - please consult the provided on-line help database, from
  229.  within the 3dCW program.
  230.  
  231. *******************************************************************************
  232. *                                   OBJECTS                                   *
  233. *******************************************************************************
  234.   The 3D objects are defined as the following TP object-structures :
  235.   
  236. *******************************************************************************
  237. *                                 BaseObject                                  *
  238. *******************************************************************************
  239.  baseObject - defined in the RTOBJ.PAS file, this is the "dummy"
  240.  ancestor object class of the 3D-objects, such an object has a CTM (called
  241.  myCTM), a color, a center of gravity 3D point (location), and other display
  242.  attributes, in order to achieve better animation results, a scrPntUpdt 
  243.  boolean variable is used to indicate if the screen 2D points of the
  244.  object has to be re-calculated from the 3D representation.                       
  245.   
  246.   The object uses a 4X4 "transformation matrix" to represent itself in the
  247.  3D universe, the move, translate, scale, allScale, rotate, goto3dPos,
  248.  setToOrigin, calcLocation and deleteTransform methods are used to update
  249.  that matrix (the Current Transformation Matrix).
  250.  
  251.   The load, save, writeMe, and readMe methods are used to store and retrieve
  252.  a 3D object from a storage device (a disk..), and the open and close methods
  253.  are used to construct, and destruct the object. The show, hide and paint
  254.  methods display, or erase the object on the 2D screen. One more interesting
  255.  method is the updateScreenPoints method, that transforms the 3D object 
  256.  representation to the 2D screen.
  257.  
  258. *******************************************************************************
  259. *                                    obj3D                                    *
  260. *******************************************************************************
  261.   obj3D is a descendant object of the baseObject class, this is a simple
  262.  wire-mesh object, that is built from a Collection of 3D points 
  263.  in the 3D universe, a collection of 3d  lines (a line is a segment in the
  264.  3D universe that connects 2 3D points), another collection holds the 2D screen
  265.  points of the object, calculated from its 3D representation, and the CTM.
  266.  Another interesting aspect of this object is the use of 2 more matrices,
  267.  the reverseRot, and unReverseRot CTM objects, that are used to hold only the
  268.  reverse, and counter reverse of the rotation transformations, these are used
  269.  by complex objects that contain several obj3D objects, where some of them 
  270.  has to be rotated, scaled and translated around an arbitrary point in the
  271.  3D universe, which is not their center of gravity (frame - reference).
  272.  
  273.   This object is refered as simple object in some places in the provided 
  274.  documentation.
  275.  
  276. *******************************************************************************
  277. *                                 complexObj                                  *
  278. *******************************************************************************
  279.   The RTOBJ.PAS file contains the definition of the complexObj 3D object,
  280.  this is an object that contains a maxSubObjects (defined in that file)
  281.  array of simple wire-mesh obj3D objects. This object class sometimes
  282.  referred to as the "super - object", allows the user to create complex 3D
  283.  objects that has a common frame - reference (center of gravity), an example
  284.  of such an object might be a Robot, that has a center of gravity, and is
  285.  built of some sub objects that must be able to be transformed both with the
  286.  frame - reference, and by themselves.
  287.  
  288.   The RTOBJ.PAS (for - RunTime object) unit file contains the definition of
  289.  the baseObj, obj3D and the complexObj classes.
  290.  
  291.  
  292. *******************************************************************************
  293. *                                 PROJECTIONS                                 *
  294. *******************************************************************************
  295.  
  296.   The PROJECT3.PAS file contain the code that transforms objects and points
  297.  from the 3D universe, to the 2D coordinates.
  298.  
  299.   Two 3D -> 2D transformations are supported, axonometric projection, and 
  300.  perspective projection. This is a short explanation of the difference
  301.  between these 2 projections :
  302.  
  303.                A : axonometric projections, no perspective due to        
  304.                        distance is performed, the general way            
  305.                        we can look at the coordinate system is as        
  306.                        follows :                                         
  307.                                                                          
  308.                                |  z axis                                 
  309.                                |                                         
  310.                               / \                                        
  311.                     x axis   /   \  y axis                               
  312.                                                                          
  313.                B : perspective projections : the normal eye perspective  
  314.                        projection is performed, we can look at the 3d    
  315.                        universe we are referring to as a cube of          
  316.                        1000 x 1000 x 1000 integer locations, with        
  317.                        the x axis, and y axis parallel to the screen     
  318.                        x, y axis respectively, and the z axis going into  
  319.                        the screen.                                       
  320.                                                                          
  321.                        we will look at the coordinate system as follows :
  322.                                                                          
  323.                        │ Y axis                                          
  324.                        │                                                 
  325.                 Z axis x------ X axis                                    
  326.                                                                          
  327.   These units contain a calcPoint procedure that receives a 3D point, and
  328.  transforms it to a 2D screen coordinate, the setPerspective, 
  329.  resetPerspective and togglePerspective change from perspective projection
  330.  to axonometric projection, and vice versa.
  331.  
  332. *******************************************************************************
  333. *                                     CTM                                     *
  334. *******************************************************************************
  335.  
  336.   CTM3D.PAS is the file that defines the current transformation matrix that                                      
  337.  is used to position the 3D objects in the universe. The CTM is a 4x4 matrix
  338.  that is multiplied (from the right) by each point of the 3D object whenever
  339.  a new location is desired for the object. 
  340.  
  341.   This unit defines all the transformations that can be applied and used
  342.  by a CTM, like rotate, scale, translate etc..
  343.  
  344. *******************************************************************************
  345. *                                 3D2 FORMAT                                  *
  346. *******************************************************************************
  347.  
  348.   The obj3D object files are files of type real, that has the following
  349.  structure :
  350.  
  351.  1 Real entry : number of 3D points. (We will call in numOfPoints)
  352.  numOfPoints entries that contain the following information :
  353.      1 Real Entry : X location in the 3D universe.
  354.      1 Real Entry : Y location in the 3D universe.
  355.      1 Real Entry : Z location in the 3D universe.
  356.  1 Real Entry : number of lines.  (We will call it numOfLines)
  357.  numOfLines entries that contain the following information :
  358.      1 Real Entry : 3D Point Number of "From" edge of the line.
  359.      1 Real Entry : 3D Point Number of "To" edge of the line.
  360.  
  361.  Please refer to the OBJ3D.README method that deals with reading this 
  362.  3D file format.
  363.  
  364.  To Create object of this kind - Please use the 3dO object compiler provided
  365.  with this package, or the 3D environment program available in a different
  366.  package, or with the registered version.
  367.  
  368. *******************************************************************************
  369. *                                 3DS FORMAT                                  *
  370. *******************************************************************************
  371.  
  372.   The complexObj object files are files of real type that have the
  373.  following structure :
  374.  
  375.  1 Real Entry : Number of subobjects the complexObj contain (We will
  376.                  call it numOfChilds)
  377.  numOfChilds entries that have the same structure as simple 3D2 files.
  378.  
  379.  To Create object of this kind - Please use the 3dO object compiler provided
  380.  with this package, or the 3D environment program available in a different
  381.  package, or with the registered version.
  382.  
  383. *******************************************************************************
  384. *                                  Warranty                                   *
  385. *******************************************************************************
  386.  
  387.   There is no warranty what so ever, The package is supplied as is,
  388.  The distributor (ISoft D&M), or the author (Loewy Ron), are not,
  389.  and will not be responsible for any damages, lost profits, 
  390.  or inconveniences caused by the use, or inability to use this package. 
  391.  The use of the package is at your own risk. 
  392.  By using (or attempting to use) the package you agree to this.
  393.  
  394. *******************************************************************************
  395. *                                   General                                   *
  396. *******************************************************************************
  397.  
  398.   3dLIB is distributed by ISoft D&M, P.O.B. 5517 CORALVILLE IA 52241, U.S.A.
  399.   
  400.   3dLIB is (c) copyrighted by Loewy Ron, 1991,93.
  401.  
  402.   3dLIB is a shareware package, please register your copy. 
  403.   To register your copy of 3dLIB please refer to the supplied
  404.   3DLIB.REG file. 
  405.  
  406.   Other programs distributed by ISoft D&M are described in the supplied  
  407.   PROGRAMS.TXT file.
  408.  
  409. *******************************************************************************
  410. *                                   Contact                                   *
  411. *******************************************************************************
  412.  
  413.   Please contact :
  414.  
  415.   ISoft D&M,  
  416.   P.O.B 5517
  417.   Coralville IA 52241,
  418.   U.S.A
  419.  
  420.   To contact the author directly : 
  421.  
  422.   Contact :     Loewy Ron,
  423.                 9 Haneveem st.
  424.                 Herzeliya, 46465
  425.                 ISRAEL.
  426.  
  427.   e-mail address : CompuServe - 100274,162
  428.  
  429. *******************************************************************************
  430. *                                   Credits                                   *
  431. *******************************************************************************
  432.  
  433.   3dLIB was written using Turbo Pascal 6.0 & 7.0, as well as 
  434.   Turbo Pascal for Windows 1.0, 1.5 and Borland Pascal with objects 7.0.
  435.   These products are trademarks of Borland international.
  436.  
  437.   Windows 3.0 and Windows 3.1 are trademarks of Microsoft Corp.
  438.  
  439.   The Borland Brief v3.1 editor was used to write these programs.
  440.  
  441.   The windows help file, as well as the TPH file were created using the 
  442.   help development kit (hlpdk) v5.0 by Loewy Ron.
  443.  
  444.   The Author's picture (in the 3dCW program) was taken by Allison Bially.
  445.  
  446.  
  447.